# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=libdvbcsa
pkgver=1.1.0
pkgrel=1
pkgdesc="Free implementation of the DVB Common Scrambling Algorithm"
url="http://www.videolan.org/developers/libdvbcsa.html"
arch="all"
license="GPL"
subpackages="$pkgname-dev"
source="https://download.videolan.org/pub/videolan/libdvbcsa/$pkgver/libdvbcsa-$pkgver.tar.gz"


prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="f336bc90711261bb86bb42f897d5207a71da5a384bfb7d641de7e1fb3a43d20aeec250e9a5ceaf0b20f1e4335ccda70055675256c6889873bf1bfff55005a015  libdvbcsa-1.1.0.tar.gz"
